{
  "projects": {
    "project": [
    {{foreach from=$projects item=project name=feprojects}}
      {
        "id": "{{$project.pid}}",
        "name": "{{$project.name}}",
        "tasks": {
          "task": [
          {{foreach from=$project.tasks item=task key=tid name=fetasks}}
          
            {
              "id": "{{$tid}}",
              "images": "{{$task.images}}",
              "name": "{{$task.name}}",
              "author": "{{$task.author}}",
              "date": "{{$task.date}}",
              "finish_date": "{{$task.finish_date}}",
              "finish_date_left": "{{$task.finish_date_left}}",
              "dateago": "{{$task.dateago}}",
              "state_date": "{{$task.status_date}}",
              "desc": "{{$task.desc}}",
              "important": "{{$task.important}}",
              "tasktype": "{{$task.tasktype}}",
              "reproted": "{{$task.reported}}",
              "pointTypeID": "{{$task.pointTypeID}}",
              "point": "{{$task.point}}",
              "daily": "{{$task.daily}}",
              "users": {
                "user": [
                {{foreach from=$task.users item=user name=feusers}}
                {
                  "id": "{{$user.id}}",
                  "fbuid": "{{$user.fbuid}}",
                  "owner": "{{$user.owner}}",
                  "name": "{{$user.name}}",
                  "image": "{{$user.image}}",
                  "totaltaskscount": "{{$user.totaltaskscount}}",
                  "todaydonetaskscount": "{{$user.donetaskscount}}"
                }
                {{if $smarty.foreach.feusers.last}} {{else}},{{/if}}
      					{{/foreach}}
               ]
              }
            }
            {{if $smarty.foreach.fetasks.last}} {{else}},{{/if}}
      			{{/foreach}}
          ]
        }
      }
      {{if $smarty.foreach.feprojects.last}} {{else}},{{/if}}
      {{/foreach}}
    ]
  }
}